package com.lanca.feignclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 指定不可用时的熔断处理
 */
@FeignClient(value = "HYSTRIX", fallback = HystrixClientFallBack.class)
public interface HystrixClient {

    /**
     * 这个注解很重要 @RequestParam("id")
     *
     * @param id id
     * @return
     */
    @GetMapping("/demo")
    String demo(@RequestParam("id") Integer id);
}
